package com.xc.generics;


import java.util.ArrayList;
import java.util.List;

public class GenericType {
    public static void main(String[] args) {  
		ArrayList<? extends Number> list = new ArrayList<>();

        test(list);
    }
    static <T> void test(List<? extends Number> list){
        ArrayList<?> list1 = new ArrayList<>();
        ArrayList<T> list2 = new ArrayList<>();

        list1.add(null);
        list2.add(null);

        Object o = list1.get(0);
        T t = list2.get(0);
    }
}
